﻿using ConsoleApp6;
using Microsoft.Extensions.Options;

namespace 配置
{
    public class PrintService
    {
        private readonly IOptionsSnapshot<Employee> optfig;
        public PrintService(IOptionsSnapshot<Employee> optfig)
        {
            this.optfig = optfig;
        }

        public void Print()
        {
            var employee = optfig.Value;
            Console.WriteLine(employee.ToString());
        }
    }
}
